<?php
class Privileges_Model_Privileges implements Privileges_Model_Mainable{
    
    private $excepted_acces_level = 9;
    
    private $action_handler;
    
    public function main(array $variables = null) {
        if(isset($_SESSION['access_level']) && ($_SESSION['access_level'] == $this->excepted_acces_level)){
            $this->action_handler = new Privileges_Model_Actiondecision;
            return $this->action_handler->main($variables);
        }
        else {
            $this->action_handler = new Core_Controller_Hackredirect;
            $this->action_handler->main($variables);
        }
    }

}
